home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2 - Developers' Solutions / Delphi 2 Developers' Solutions.iso / dds / chap01 / howto01 / delphi10 / ccsaver.dpr < prev    next >
Encoding:
Text File  |  1995-08-18  |  925 b   |  31 lines

  1. program Ccsaver;
  2.  
  3. uses
  4.   Forms,
  5.   SysUtils,
  6.   Ccscreen in 'CCSCREEN.PAS' {CCScreenSaverForm},
  7.   Ccsavrsu in 'CCSAVRSU.PAS' {SetupDialog},
  8.   Ccerrors in 'CCERRORS.PAS' {BtnBottomDlg};
  9.  
  10. {$R *.RES}
  11. {$D SCRNSAVE CIUPKC Screen Saver}
  12.  
  13. begin
  14.   { Windows requires only one instance to be allowed at a time }
  15.   if hPrevInst = 0 then begin
  16.     if ( ParamCount > 0) and ( UpperCase( ParamStr( 1 )) = '/S') then
  17.     begin
  18.       { Set CCScreenSaverForm to the Main Form }
  19.       Application.CreateForm( TCCScreenSaverForm , CCScreenSaverForm );
  20.       Application.CreateForm( TSetupDialog , SetupDialog);
  21.     end
  22.     else
  23.     begin { note that this works if program invoked without params! }
  24.       { Set SetupDialog to the Main Form }
  25.       Application.CreateForm( TSetupDialog , SetupDialog );
  26.       Application.CreateForm( TCCScreenSaverForm , CCScreenSaverForm );
  27.     end;
  28.     Application.Run;
  29.   end;
  30. end.
  31.